UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'srvRqo/ZCr5OoSytkd/ZRmOR1H2gcx5Dap6JsPUNkC4=' 
WHERE 
  key_id = '67cdd7b8bf4f56ca25349718e96ba47d14d8c3d35bb8fb890aa01f820d831a88' 
  AND (
    token = 'srvRqo/ZCr5OoSytkd/ZRmOR1H2gcx5Dap6JsPUNkC4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036