UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PrqoyZfeFVRXmXX3v8L75hk6InFN/pwDtl6rcxoWtqw='
WHERE
key_id = '456f298a31ac6e7c483c6070042f968af1553738391e876469d0e55fc85e0118'
AND (
token = 'PrqoyZfeFVRXmXX3v8L75hk6InFN/pwDtl6rcxoWtqw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)