UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yA8R0mswK4yiOr4js7Kk83zgjgR9aTbXh/XnLoK43lY=' 
WHERE 
  key_id = '9062d7fbe4f9d3b7056a03fb9f53bc48468095ad87ae8d83cc0229607fc41f39' 
  AND (
    token = 'yA8R0mswK4yiOr4js7Kk83zgjgR9aTbXh/XnLoK43lY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034