UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DsbXFwGpDZm6BtiZ9mddO/RsZ8MzjVPd/aOQwa/KwhE='
WHERE
key_id = '574fbd8e53adcbe7bde4b2fb1fd183bca12f7a9018e42ccc9735e9dc516b4adf'
AND (
token = 'DsbXFwGpDZm6BtiZ9mddO/RsZ8MzjVPd/aOQwa/KwhE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)