UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jRR5jSKfHUAskUejPzX/TXVK5GPQ/2ORtnoUVy61194='
WHERE
key_id = '2b3908773ba743986b3a82d9b93c9fe2bc2098ba4acb3de8e0c006518d144339'
AND (
token = 'jRR5jSKfHUAskUejPzX/TXVK5GPQ/2ORtnoUVy61194='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)