UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eVNS2dwTcrYJob3YIl5WfN71Cg/1lYZzgBEiXqQ6q8o='
WHERE
key_id = '754b8b27111cddb01a0fecd3bec90711ff850d559ce22ffdf29f568b40181622'
AND (
token = 'eVNS2dwTcrYJob3YIl5WfN71Cg/1lYZzgBEiXqQ6q8o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)