UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4DEO/Zf8mm01ZqSpvvPcnd9Trd4LBu3BGG9pnoJAJFQ=' 
WHERE 
  key_id = '62ed59e75339fd9cb5a5dde0de2d60e66d4df4d796807242af297ce914441ae4' 
  AND (
    token = '4DEO/Zf8mm01ZqSpvvPcnd9Trd4LBu3BGG9pnoJAJFQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039