UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uzB1tYcu84/J2sDjqGUb4dUJTV0rUB0i+stl9Em1640='
WHERE
key_id = '792947cb0f1e4cb9292d3d3aae682b80c765f20e4fed1bc4a45aac56358a5c43'
AND (
token = 'uzB1tYcu84/J2sDjqGUb4dUJTV0rUB0i+stl9Em1640='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)