UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pWMGZ4NeDqJQq03HqbPruxfpS4f1fKsvp6A5/aQKnxM='
WHERE
key_id = '728a68294ce0e2f8b5a7c4441cee1dc83b0c73aaaf151bdd9032585e71bf55fa'
AND (
token = 'pWMGZ4NeDqJQq03HqbPruxfpS4f1fKsvp6A5/aQKnxM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)