UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'w0o/Fq/jMMclbHN1cj185/zrUNHYhbZxP9GK3fe4KBs=' 
WHERE 
  key_id = '6e3d426ee2aa9d75dc6a04e34a8fd27f8c840b35f4774305a1402e5e3eafc617' 
  AND (
    token = 'w0o/Fq/jMMclbHN1cj185/zrUNHYhbZxP9GK3fe4KBs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031