UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'p6/oW/72w43EAx/SlZNp1O4ob9ojGYbpfYv5sfwGCkc='
WHERE
key_id = '11ea64768dcb0c4568a13bb077d56343ba319f531653acda612cca9963efb0af'
AND (
token = 'p6/oW/72w43EAx/SlZNp1O4ob9ojGYbpfYv5sfwGCkc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)