UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FnOWT3djWjGv1bJSp8+lsCLFLNOhPOGvsRNSPlU6cbs=' 
WHERE 
  key_id = '5f256163727c77e6651cf56e8a657bee7cc3f81a42bb05058098afca056dd1cc' 
  AND (
    token = 'FnOWT3djWjGv1bJSp8+lsCLFLNOhPOGvsRNSPlU6cbs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039