UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5cIiGJtPR0mU6Ygvzqce8Z1o5irHGKH4wjMgVmjwf9E='
WHERE
key_id = 'feeb85af68ff6f9ccc91c44c264fb72ae2c7867bc9b68f8404c5f1864e119dbc'
AND (
token = '5cIiGJtPR0mU6Ygvzqce8Z1o5irHGKH4wjMgVmjwf9E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)