UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'R0bhWEFC9SDjEshZcHmvIaDKoqfR4KlRAtn+pUFDyE0='
WHERE
key_id = '6a86ba10dfc285b56f1d82fc1372c559729779cf7ab7de6e5f5343987bada137'
AND (
token = 'R0bhWEFC9SDjEshZcHmvIaDKoqfR4KlRAtn+pUFDyE0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)