UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pv/dYwUyulvWwIo4TZDGwZOjuXI3V11/Zwgy8WM5kuA=' 
WHERE 
  key_id = 'c8d0c1547a39ff9889defb302af8b15972b66ccefdd386ac8fd146e1099ded9e' 
  AND (
    token = 'pv/dYwUyulvWwIo4TZDGwZOjuXI3V11/Zwgy8WM5kuA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00111