UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QjV3dzyd3pXFI/KZuZCCObfg7GF7WEVK7g9cC3iDBsM='
WHERE
key_id = '51920d7ddbc69e1e5adeed4ec9327f4db0095a7252296a0af9c78a3515f6ae4b'
AND (
token = 'QjV3dzyd3pXFI/KZuZCCObfg7GF7WEVK7g9cC3iDBsM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)