UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7d5EKAQDBnHHGoQrJI4yg22INR10uQcVWvL4Sfl+5l8='
WHERE
key_id = '2c207c6cd5c39b8278bc25709d09e9a8884a38934fd27ccd68ef338433ad6b8b'
AND (
token = '7d5EKAQDBnHHGoQrJI4yg22INR10uQcVWvL4Sfl+5l8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)