UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PoBqokbUuX3gFFFmI0f5cNnNrjkDraho/XjDBgKOFiM='
WHERE
key_id = 'ac2d72796fac41ea749318b75d2664fa51d901b94200aaa7917db8bedaf92691'
AND (
token = 'PoBqokbUuX3gFFFmI0f5cNnNrjkDraho/XjDBgKOFiM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)