UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vlqTZiqqqwJLMEKUoM3vMA1de9mZbtftgs+CU8hqsPo='
WHERE
key_id = '4afef5c8af9d61e30b1c34b14929383b78fc59823332176783fdc04b627597c5'
AND (
token = 'vlqTZiqqqwJLMEKUoM3vMA1de9mZbtftgs+CU8hqsPo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)