UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iJNj4g+uDSAYlWbbAlqOw89lJfAJYpqaxurliY6MkUI='
WHERE
key_id = '60b6ecf8f6328b53d97fd83604b1f53cecfae75c88254cee8ce5870901f21d61'
AND (
token = 'iJNj4g+uDSAYlWbbAlqOw89lJfAJYpqaxurliY6MkUI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)