UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8UceommeUmJRF6MU0rROnp+FYpm0O2w9epuTaKwhWO4='
WHERE
key_id = '41420987e80045718991a4c09dfc00b1cad2c92f632a82b94f797ee0bd0477b8'
AND (
token = '8UceommeUmJRF6MU0rROnp+FYpm0O2w9epuTaKwhWO4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)