UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/l3mg/Ol2YJMGC6qYWED+Byk6CI6dbPamnP5uNnr3vk='
WHERE
key_id = 'cb34bce7ef36119817e2be1595cdc71c8bf93fd2588e0a1b02848fa6e937d0dd'
AND (
token = '/l3mg/Ol2YJMGC6qYWED+Byk6CI6dbPamnP5uNnr3vk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)