UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZfH1/nuI7TyQvM9CrOHcmJRVWDmxweC0ofEIhOHU0kE='
WHERE
key_id = '0912c82f6e57fd6c716c607cce9f8352a862eaf50dd4f1e6b32efdfed851129c'
AND (
token = 'ZfH1/nuI7TyQvM9CrOHcmJRVWDmxweC0ofEIhOHU0kE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)