UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JpcAaspRaPC7xY/vSlihyDkK1goW/LVx0SJ3r3PnYxI='
WHERE
key_id = '6f6043006adbf3c32264f9e489d7359278b3aa44d30552a1a5d2746c45d13dce'
AND (
token = 'JpcAaspRaPC7xY/vSlihyDkK1goW/LVx0SJ3r3PnYxI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)