UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lwWwqWvtkwp+Oa9JmYuEEwjqXptMXDE0ptFlnaN0q/E='
WHERE
key_id = '619a359ec0bda41dbf044e72910c042f9b2672bb8d509c594503d0fa92889b15'
AND (
token = 'lwWwqWvtkwp+Oa9JmYuEEwjqXptMXDE0ptFlnaN0q/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)