UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PJ4DYh2q9M0qFp5faAOSV0Ymu/9W4X5wQcoAv8vC+UY=' 
WHERE 
  key_id = '355fe74bb3e7ffe8ebbe9cd7e72b27be79baa4488be824ac463057cf1a87ffc6' 
  AND (
    token = 'PJ4DYh2q9M0qFp5faAOSV0Ymu/9W4X5wQcoAv8vC+UY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018