UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PxRVQcWT0+/wqZORI9Q6qlCTSzy9LkF9umsv7pmgvDk='
WHERE
key_id = '5e881db3ce075ec144c4d97ab700f59a0d383930eee708150ae7b8b2ac6f34df'
AND (
token = 'PxRVQcWT0+/wqZORI9Q6qlCTSzy9LkF9umsv7pmgvDk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)