UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rZiqSukSHi3dVuZb3gUigsahavW8cybuH8XIsdeA3bk='
WHERE
key_id = '72d09948cbae42a733dedfdc55add726de82305149654d3112c2605fd2c56bc3'
AND (
token = 'rZiqSukSHi3dVuZb3gUigsahavW8cybuH8XIsdeA3bk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)