UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y+Vr1lTJ0D0pyhD5HeoVQhByFQUpki/dnwXdmPptfP0='
WHERE
key_id = '9bef1b952c31faa9a70cf2b94fc045fa61f3eacd48301c6a05aea8a8b314e065'
AND (
token = 'y+Vr1lTJ0D0pyhD5HeoVQhByFQUpki/dnwXdmPptfP0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)