UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '14w3XuQdplfsX0HKw6NQP3zGu32XfT8Ha5dMwT+4BeQ='
WHERE
key_id = '59060187f308b07453ef937d2c93bd08c4acbebfb1dfe8f55a8436a5616e03c2'
AND (
token = '14w3XuQdplfsX0HKw6NQP3zGu32XfT8Ha5dMwT+4BeQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)