UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'StWs59TEK+vuPGaFBUG+Sh2+s6+saiFGvQuuj6S1sJs='
WHERE
key_id = '05e2f94f568f3f6809025e70d6e1c9ab493eb3aa0dc73def7124ffd1b455c21c'
AND (
token = 'StWs59TEK+vuPGaFBUG+Sh2+s6+saiFGvQuuj6S1sJs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)