UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UF1tBCaDq5tHiL9HVt7WLBUkDqziAe4T7jtkFq7A7MU='
WHERE
key_id = '953e98fbf7f836eafcddcda8186b1929675c94f4034394a9190fd30d26fffe2b'
AND (
token = 'UF1tBCaDq5tHiL9HVt7WLBUkDqziAe4T7jtkFq7A7MU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)