UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yU2U1P2TS8k10q8X2kSZR4F/0YN2m4OH3uKjvIc5KQU='
WHERE
key_id = '88f896fc5d232846908fc0d3d47b3a1ad55541d01d5e174b1bd67a702196d817'
AND (
token = 'yU2U1P2TS8k10q8X2kSZR4F/0YN2m4OH3uKjvIc5KQU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)